package com.ruoyi.qd.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum OrderStatusEnum {
    PAID("1", "已支付"),
    USED("2", "已使用"),
    USER_CANCEL("3", "用户取消"),
    SYSTEM_CANCEL("4", "系统取消"),
    PASS_NUMBER("5", "过号"),
    ;

    private final String code;
    private final String info;

    public static String getInfoByCode(String code) {
        for (OrderStatusEnum tradeWaterTypeEnum : OrderStatusEnum.values()) {
            if (tradeWaterTypeEnum.getCode().equals(code)) {
                return tradeWaterTypeEnum.getInfo();
            }
        }
        return null;
    }
}
